package com.umakr.ax.app.web;

import java.util.Map;

import com.umakr.ax.app.service.ShowDiscussWebService;
import com.umakr.ax.common.service.ShowDiscussService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import com.umakr.ax.common.model.ShowDiscuss;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import com.umakr.ax.core.base.AbstractController;

/**
 * <p>
 * 秀评论  前端控制器
 * </p>
 *
 * @author Umakr-Code-Generator
 * @since 2017-12-30
 */
@Controller
@RequestMapping("/api/web/showDiscuss")
public class ShowDiscussWebController extends AbstractController {

	@Autowired
	ShowDiscussWebService showDiscussWebService;

	/**
	 * 审核电台秀评论
	 * @param modelMap
	 * @return
	 */
	@ApiOperation(value = "审核电台秀评论")
	@GetMapping("/updateShowDiscussReviewStatus")
	public Object updateShowDiscussReviewStatus(ModelMap modelMap, Long discussId,Integer reviewStatus ) {
		return setSuccessModelMap(modelMap,showDiscussWebService.updateShowDiscussReviewStatus(discussId,reviewStatus));
	}

	/**
	 * 读取电台秀评论
	 * @param modelMap
	 * @return
	 */
	@ApiOperation(value = "读取电台秀评论")
	@GetMapping("/listShowDiscuss")
	public Object listShowDiscuss(ModelMap modelMap, Long showId ) {
		return setSuccessModelMap(modelMap,showDiscussWebService.listShowDiscuss(showId));
	}

	/**
	 * 软删除电台秀评论
	 * @param modelMap
	 * @return
	 */
	@ApiOperation(value = "电台删除评论")
	@GetMapping("/delShowDiscuss")
	public Object delShowDiscuss(ModelMap modelMap, Long discussId ) {
		return setSuccessModelMap(modelMap,showDiscussWebService.delShowDiscuss(discussId));
	}


}